package com.SouthernWall_404.AgeSuitcase.Common.API.GuiAPI.Animation;

import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.components.AbstractWidget;

public class FadingIn extends AbstractAnimation{

    public FadingIn(AbstractWidget abstractWidget)
    {
        this(abstractWidget,20);
    }

    public FadingIn(AbstractWidget abstractWidget, int time) {
        super(abstractWidget, time);
    }

    public FadingIn(AbstractWidget abstractWidget, int time, AbstractAnimation next) {
        super(abstractWidget, time, next);
    }

    @Override
    public void render(GuiGraphics guiGraphics,float partialTicks)
    {

//        super.render(guiGraphics,partialTicks);
            guiGraphics.pose().pushPose();
            guiGraphics.setColor(1.0f, 1.0f, 1.0f, rate);

//            RenderSystem.enableBlend();
            abstractWidget.render(guiGraphics, x, y, partialTicks);

            guiGraphics.setColor(1.0f, 1.0f, 1.0f, 1);

            guiGraphics.pose().popPose();

    }


    @Override
    public void customOnFinished(GuiGraphics guiGraphics, float partialTicks) {
        return;
    }


}
